package com.sh3h.generator.web.dtos;

import com.sh3h.generator.web.domain.GenFtl;
import com.sh3h.generator.web.domain.GenProject;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 项目名信息
 *
 * @TableName gen_project
 */
@Data
public class GenProjectDto implements Serializable {
    /**
     * id
     */
    private Long id;

    /**
     * 项目名
     */
    private String projectName;

    /**
     * 项目标识
     */
    private String projectCode;

    /**
     * 项目包名
     */
    private String projectPackage;

    /**
     * 项目路径
     */
    private String projectPath;

    /**
     * 创建时间
     */
    private Date createTime;

    private static final long serialVersionUID = 1L;

    public static GenProject ToModal(GenProjectDto dto) {
        GenProject datasource = new GenProject();
        datasource.setId(dto.getId());
        datasource.setProjectCode(dto.getProjectCode());
        datasource.setProjectName(dto.getProjectName());
        datasource.setProjectPath(dto.getProjectPath());
        datasource.setCreateTime(dto.getCreateTime());
        return datasource;
    }
}